<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .parent{
            height: 300px;
            width: 300px;
            background: red;
            overflow: hidden;
            position: relative;
        }
        .parent:hover .child{
            transform: rotate(0deg);
        }
        .child{
            height: 300px;
            width: 300px;
            position: absolute;
            top: 0;
            left: 0;
            z-index: 100;
            background: rgb(99, 98, 98);
            transform: rotate(90deg);
            transform-origin: right bottom;
            transition: all 1s;
        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="child"></div>
    </div>
</body>
</html>